import { createStore } from 'vuex'

const files = import.meta.globEager('./modules/*.js')
const modules = {}
for (var key in files) {
	modules[key.replace(/(\.\/modules\/|\.js)/g, '')] = files[key].default
}
// console.log(modules)

const store = createStore({
	state () {
	    return {
		}
	},
	mutations: {
		// 清空所有本地缓存信息以及store保留的数据
		clearAllInfo (state) {
			store.commit('user/resetUserStore')
			store.commit('app/resetAppStore')
		}
	},
	actions: {
		
	},
	modules
})

export default store